package com.weiun.common.base.bean;


import com.github.pagehelper.Page;

import java.io.Serializable;
import java.util.List;

/**
 * The type Page result.
 */
public class PageResult<T> implements Serializable, Cloneable {
    private static final long serialVersionUID = 1L;
    private int pageNum;
    private int pageSize;
    private long total;
    private int pages;
    private String orderBy;
    private List<T> list;

    public PageResult(Page<T> list) {
        this.list = list;
        this.pageNum = list.getPageNum();
        this.pageSize = list.getPageSize();
        this.total = list.getTotal();
        this.pages = list.getPages();
    }

    public int getPageNum() {
        return pageNum;
    }

    public void setPageNum(int pageNum) {
        this.pageNum = pageNum;
    }

    public int getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    public long getTotal() {
        return total;
    }

    public void setTotal(long total) {
        this.total = total;
    }

    public int getPages() {
        return pages;
    }

    public void setPages(int pages) {
        this.pages = pages;
    }

    public String getOrderBy() {
        return orderBy;
    }

    public void setOrderBy(String orderBy) {
        this.orderBy = orderBy;
    }

    public List<T> getList() {
        return list;
    }

    public void setList(List<T> list) {
        this.list = list;
    }
}
